local quchi = fk.CreateSkill {
    name = "gai__quchi",
  }
  
  Fk:loadTranslationTable{
    ["gai__quchi"] = "驱斥",
    [":gai__quchi"] = "出牌阶段限一次，你可以对一名角色造成1点火焰伤害，若其有连接牌，则重置你与其连接牌。",
  
    ["#gai__quchi-active"] = "驱斥：你可对一名角色造成1点伤害，若其有连接牌，重置你与其连接牌。",
  }
  
  local U = require "packages/utility/utility"
  
  quchi:addEffect("active", {
    prompt = "#gai__quchi-active",
    card_num = 0,
    target_num = 1,
    can_use = function (self, player)
      return player:usedSkillTimes(quchi.name, Player.HistoryPhase) == 0
    end,
    card_filter = Util.FalseFunc,
    target_filter = function (self, player, to_select, selected)
      return #selected == 0
    end,
    on_use = function(self, room, effect)
      local from = effect.from
      local to = effect.tos[1]
  
      local hasConnectedCard = false
      
      -- 检查并重置目标角色的连接牌
      table.forEach(to:getCardIds("h"), function(id)
        if U.isConnectedCard(id) then
          hasConnectedCard = true
          U.connectCards(room, id)
        end
      end)
      
      -- 检查并重置使用者自己的连接牌
      table.forEach(from:getCardIds("h"), function(id)
        if U.isConnectedCard(id) then
          hasConnectedCard = true
          U.connectCards(room, id)
        end
      end)
  
      room:damage{
        from = effect.from,
        to = to,
        damage = 1,
        damageType = fk.FireDamage,
        skillName = quchi.name,
      }
    end,
  })
  
  return quchi